package com.atguigu.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MySelfRule {

    @Bean
    public IRule myRule(){

        //将管理该服务消费者项目的Ribbon工具的负载均衡规则设置为“随机”
        return new RandomRule();
    }
}
